﻿using Microsoft.SharePoint;

namespace Eneta.Portal.Profiles
{
    public static class Utility
    {
        public static void RemoveAll(this SPAttachmentCollection coll)
        {
            var items = new string[coll.Count];

            for (var i = 0; i < coll.Count; i++)
                items[i] = coll[i];

            foreach (string attachment in items)
                coll.Delete(attachment);
        }                       
    }
}
